// author: aYo Binitie ii
// MLP 2008
// this class is attached as an inline class accessible only to the IController subclasses
// It allows the controller classes sweep up undefined functions picked up by the generic function
//
import flash.utils.Proxy;
import flash.utils.flash_proxy;

dynamic class MLPControllerProxy extends Proxy {
    private var _item:Array;

    public function MLPControllerProxy() {
		_item = new Array();        
    }

    override flash_proxy function callProperty(methodName:*, ... args):* {
        var res:*;
         switch (methodName.toString()) {
           
				default:
                trace(nofunction())
				res = nofunction()
                break;
        }
        return res;
    }

    override flash_proxy function getProperty(name:*):* {
        return _item[name];
    }

    override flash_proxy function setProperty(name:*, value:*):void {
        _item[name] = value;
    }
	
	 public function nofunction():String {
        return "NO FUNCTION"
    }
}